%%{init: {'themeVariables': { 'fontSize': '12px'}}}%%
graph TD
    classDef path fill:#eee,stroke:#000,color:#000
    classDef plan fill:#fff,stroke-width:1px,color:#000
    classDef itemplan fill:#fff,stroke-width:2px,color:#000
    classDef unbatchedplan fill:#dff,stroke-width:1px,color:#000
    classDef sideeffectplan fill:#fcc,stroke-width:2px,color:#000
    classDef bucket fill:#f6f6f6,color:#000,stroke-width:2px,text-align:left

    subgraph "Buckets for mutations/v4/d.deletePerson"
    Bucket0("Bucket 0 (root)"):::bucket
    Bucket1("Bucket 1 (mutationField)<br />Deps: 12, 25, 13<br /><br />1: PgDeleteSingle[9]<br />2: <br />ᐳ: Object[14]"):::bucket
    Bucket2("Bucket 2 (nullableBoundary)<br />Deps: 14, 9<br /><br />ROOT Object{1}ᐸ{result}ᐳ[14]"):::bucket
    Bucket3("Bucket 3 (nullableBoundary)<br />Deps: 9<br /><br />ROOT PgDeleteSingle{1}ᐸperson(id)ᐳ[9]"):::bucket
    end
    Bucket0 --> Bucket1
    Bucket1 --> Bucket2
    Bucket2 --> Bucket3

    %% plan dependencies
    __InputObject6{{"__InputObject[6∈0] ➊<br />More deps:<br />- Constantᐸundefinedᐳ[7]<br />- Constantᐸ1ᐳ[25]"}}:::plan
    Object12{{"Object[12∈0] ➊<br />ᐸ{pgSettings,withPgClient}ᐳ"}}:::plan
    Access10{{"Access[10∈0] ➊<br />ᐸ2.pgSettingsᐳ"}}:::plan
    Access11{{"Access[11∈0] ➊<br />ᐸ2.withPgClientᐳ"}}:::plan
    Access10 & Access11 --> Object12
    __Value2["__Value[2∈0] ➊<br />ᐸcontextᐳ"]:::plan
    __Value2 --> Access10
    __Value2 --> Access11
    ApplyInput13{{"ApplyInput[13∈0] ➊"}}:::plan
    __InputObject6 --> ApplyInput13
    PgDeleteSingle9[["PgDeleteSingle[9∈1] ➊<br />ᐸperson(id)ᐳ<br />More deps:<br />- Constantᐸ1ᐳ[25]"]]:::sideeffectplan
    Object12 & ApplyInput13 --> PgDeleteSingle9
    Object14{{"Object[14∈1] ➊<br />ᐸ{result}ᐳ"}}:::plan
    PgDeleteSingle9 --> Object14
    PgClassExpression15{{"PgClassExpression[15∈3] ➊<br />ᐸ__person__.”id”ᐳ"}}:::plan
    Access16{{"Access[16∈3] ➊<br />ᐸ9.tᐳ"}}:::plan
    Access16 --> PgClassExpression15
    PgDeleteSingle9 --> Access16
    PgClassExpression17{{"PgClassExpression[17∈3] ➊<br />ᐸ__person__.”first_name”ᐳ"}}:::plan
    PgClassExpression15 o--o PgClassExpression17
    PgClassExpression18{{"PgClassExpression[18∈3] ➊<br />ᐸ__person__.”last_name”ᐳ"}}:::plan
    PgClassExpression17 o--o PgClassExpression18
    PgClassExpression19{{"PgClassExpression[19∈3] ➊<br />ᐸ__person__...no_create”ᐳ"}}:::plan
    PgClassExpression18 o--o PgClassExpression19
    PgClassExpression20{{"PgClassExpression[20∈3] ➊<br />ᐸ__person__...no_update”ᐳ"}}:::plan
    PgClassExpression19 o--o PgClassExpression20
    PgClassExpression21{{"PgClassExpression[21∈3] ➊<br />ᐸ__person__..._no_order”ᐳ"}}:::plan
    PgClassExpression20 o--o PgClassExpression21
    PgClassExpression22{{"PgClassExpression[22∈3] ➊<br />ᐸ__person__...no_filter”ᐳ"}}:::plan
    PgClassExpression21 o--o PgClassExpression22
    PgClassExpression23{{"PgClassExpression[23∈3] ➊<br />ᐸ__person__...te_update”ᐳ"}}:::plan
    PgClassExpression22 o--o PgClassExpression23
    PgClassExpression24{{"PgClassExpression[24∈3] ➊<br />ᐸ__person__...er_filter”ᐳ"}}:::plan
    PgClassExpression23 o--o PgClassExpression24

    %% define steps
    classDef bucket0 stroke:#696969
    class Bucket0,__Value2,__InputObject6,Access10,Access11,Object12,ApplyInput13 bucket0
    classDef bucket1 stroke:#00bfff
    class Bucket1,PgDeleteSingle9,Object14 bucket1
    classDef bucket2 stroke:#7f007f
    class Bucket2 bucket2
    classDef bucket3 stroke:#ffa500
    class Bucket3,PgClassExpression15,Access16,PgClassExpression17,PgClassExpression18,PgClassExpression19,PgClassExpression20,PgClassExpression21,PgClassExpression22,PgClassExpression23,PgClassExpression24 bucket3

